<template>
  <div class="app-container">
    <div v-if="user">
      <el-row :gutter="20">

        <el-col :span="6" :xs="24">
          <user-card :user="user" :user-extend="user.userExtend" />
        </el-col>

      </el-row>
    </div>
  </div>
</template>

<script>
import UserCard from './components/UserCard'

import {
  fetchUserDetail
} from '@/api/user.js'

export default {
  name: 'Profile',
  components: {
    UserCard
  },
  data() {
    return {
      user: {},
      activeTab: 'task'
    }
  },
  computed: {
  },
  created() {
    this.getUser(this.$route.query.id)
  },
  methods: {
    changeTab(e) {
    },
    getUser(id) {
      fetchUserDetail(id).then((res) => {
        this.user = res.data
      })
    }
  }
}
</script>
